package com.ruoyi.domain;


import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.core.domain.BaseEntity;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.Date;

@Data
public class SysCoalMachine implements Serializable {

    private static final long serialVersionUID = 1L;


    private Long machineId;
    //电源电压
    private BigDecimal pow;
    //信号强度
    private Integer rssi;
    //垂直位移角度
    private BigDecimal drfV;
    //水平位移角
    private BigDecimal drfH;
    //位移量
    private BigDecimal drft;
    private BigDecimal alt;
    //创建时间
    private LocalDateTime detectedTime;
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;
    //当前用电量
    private Integer mod;
    //当前用电功率
    private BigDecimal lon;
    //仪表ip地址
    private BigDecimal lat;
    //仪表端口号
    private String clientId;
    private Integer status;
    private Byte malfunction;
    //测点编码
    private String stationCoding;

    //传感器类型
    private String transducer;

    //安装位置
    private String location;

    //东方位偏移量
    private BigDecimal eastCount;

    //北方向偏移量
    private BigDecimal northCount;

    //高程偏移量
    private BigDecimal highCount;

    //东方向速度
    private String eastVelocity;

    //北方向速度
    private String northVelocity;

    //高程方向速度
    private String highVelocity;

    //东方向加速
    private String eastVelo;

    //北方向加速
    private String northVelo;

    //高程方向加速
    private String highVelo;


    //测点值单位
    private String stationUnit;


    //测点状态
    private String stationState;
    private Integer judge;

@Override
    public String toString() {

            return
                    stationCoding + ';' +
                            transducer + ';' +
                            location + ';' +
                            lon + ';' +
                            lat + ';' +
                            alt + ';' +
                            eastCount + '|' +
                            northCount + '|' +
                            highCount + '|' +
                            eastVelocity + '|' +
                            northVelocity + '|' +
                            highVelocity + '|' +
                            eastVelo + '|' +
                            northVelo + '|' +
                            highVelo + ';' +
                            stationUnit + ';' +
                            stationState + ';' +
                            detectedTime.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));


        }

    }

